package accounts;

import java.util.Hashtable;
import stocks.Share;

/**
 * custody accounts store shares in them, a customer can have only one at a time
 * @author Mike
 */

public class CustodyAccount extends Account {
    private Hashtable<Share,Integer> Shares;

    /**
     * create a new custody account
     * @param _bank identifier of the bank
     * @param _accountNr the number of the account
     * @param _owner the id of the customer owning the account
     */
    public CustodyAccount(int _bank, int _accountNr, int _owner) {
        super(_bank,_accountNr,_owner);
    }
    /**
     * buys a given amount of shares
     * @param _share the share you want to buy
     * @param amount the amount of shares
     * @param account the account to debit
     */
    public void buyShares (Share _share, int amount, CheckingAccount account) {
    }
    /**
     * sells a given amount of shares
     * @param _share the share you want to sell
     * @param amount the amount of shares to sell
     * @param account the account to credit
     */
    public void sellShares (Share _share, int amount, CheckingAccount account) {
    }

    /**
     * returns the balance of the account by calculating the value of all shares
     * @return the balance of the account
     */
    @Override
    public int getBalance () {
        //todo: implement a methode that calculates the total value of all shares
        return 0;
    }
}

